home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5583 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: nntp.uio.no!solace!news
  2. From: cmh@lls.se (Magnus Holmgren)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: detachable program
  5. Date: 15 Mar 1996 19:20:00
  6. Organization: Visage development
  7. Message-ID: <4iglv7$au1@fizban.solace.mh.se>
  8. References: <Pine.BSD.3.91.960310002355.23759B-100000@ugly.cute.fi>
  9. NNTP-Posting-Host: lancelot.lls.se
  10. Mime-Version: 1.2
  11. Content-Type: TEXT/PLAIN; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8BIT
  13. X-FTN-To: Kristian \
  14. X-Newsreader: Spot 1.3a #26/NetGate 1.2
  15.  
  16. In a message of 10 Mar 96, Kristian wrote to :
  17.  
  18.  K\> I want to know how to make a program that detaches itself from CLI
  19.  
  20. A bit tricky, but basically:
  21.  
  22.   Start a new process.
  23.  
  24.   Save and clear Cli()->cli_Module.
  25.  
  26.   When the started process exits, unload the segment yourself.
  27.  
  28. You need some protection so that the wrong process doesn't exit first, and
  29. the above might not work if the program is resident.
  30.  
  31. If you don't mind large archives, you can check the Term sources for an
  32. example. Sorry, but I don't know of a better example! ;)
  33.  
  34. --
  35. Magnus Holmgren - Amiga programmer and enthusiast
  36.  
  37.  
  38.